package com.jilefojing.beans.enums;

public enum ResolutionEnum {
	/**
	 * "1080P", "mp4", "mp4 1080p"
	 */
	P1080_MP4("1080p", "mp4", "1080"),
	/**
	 * "720P", "mp4", "mp4 720p"
	 */
	P720_MP4("720p", "mp4", "720"),
	/**
	 * "360P", "mp4", "360p"
	 */
	P360_MP4("360p", "mp4", "360"),
	/**
	 * "240P", "mp4", "mp4 240p"
	 */
	P240_MP4("240p", "mp4", "240"),
	/**
	 * "高清","","默认是高清"
	 */
	DEFAULT("高清", "", "默认是高清");

	private String resolution;
	private String type;
	private String msg;

	private ResolutionEnum(String resolution, String type, String msg) {
		this.resolution = resolution;
		this.type = type;
		this.msg = msg;
	}

	public String getResolution() {
		return resolution;
	}

	public void setResolution(String resolution) {
		this.resolution = resolution;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public static ResolutionEnum getResolutionByTypeAndResolution(String resolution, String type) {
		for (ResolutionEnum _Enum : ResolutionEnum.values()) {
			if (_Enum.getResolution().equals(resolution) && _Enum.getType().equals(type)) {
				return _Enum;
			}
		}
		return null;
	}

}
